package com.haredot.entity.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

public enum Sex {

    SECRET("保密", "s"),  MALE("男", "m") , FEMALE("女", "f") ;

    private final String text ;

    @EnumValue
    @JsonValue // 进行序列化与反序列化
    private final String code ;

    Sex(String text, String code) {
        this.text = text;
        this.code = code ;
    }


    @Override
    public String toString() {
        return this.text ;
    }
}
